package vn.codespot.hms.task;

import vn.codespot.hms.model.response.NationalResponseModel;
import android.content.Context;

public class GetNationalTask extends AbstractTask {
    private ITaskListener mListener;

    private NationalResponseModel mResp;

    public GetNationalTask(Context context, ITaskListener listener) {
        super(context, "Getting nationals", "Cancel geting nationals");
        mListener = listener;
    }

    @Override
    protected void executes() {
        mResp = mService.getNational();
    }

    @Override
    protected void finish() {
        mListener.finish(mResp);
    }
}
